<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
//客诉管理
return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('customer_complaints', function (Blueprint $table) {
            $table->id();
            $table->integer('complain_types_id')->default(0)->comment('客诉类型');
            $table->integer('customer_id')->default(0)->comment('客户id');
            $table->integer('shop_id')->default(0)->comment('店铺Id');

            $table->string('descipt')->default('')->comment('描述');
            $table->longText('url')->default('')->comment('证据');
            $table->string('follow_up')->default('')->comment('跟进情况');
            $table->tinyInteger('status')->default(2)->comment('1是2否');
            $table->string('result')->default('')->comment('跟进情况');
            $table->string('operator_name')->default('')->comment('更新人');
            $table->string('operator_department')->default('')->comment('更新人部门');
            $table->string('operator_time')->default('')->comment('更新时间');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `customer_complaints` comment '客诉管理'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('customer_complaints');
    }
};
